package com.zb.system.service;

import com.zb.entity.AccounLoginInfo;
import com.zb.entity.AccountLoginToken;
import com.zb.exception.SMSException;
import com.zb.system.entity.LoginCustomerVo;
import com.zb.vo.LoginVo;

import javax.security.auth.login.LoginException;

/**
 * @Author WEN
 * @Date 2023/7/19 0019
 **/
public interface LoginService {
    /**
     * 登录
     * @param loginVo
     */
    AccountLoginToken login(LoginVo loginVo) throws SMSException;

    /**
     * 刷新token
     * @param refreshToken
     * @return
     */
    AccountLoginToken refreshToken(String refreshToken) throws LoginException;

    /**
     * 获取与账号关联的所有企业
     * @param accountLoginInfo
     */
    LoginCustomerVo getCustomerByAccountId(AccounLoginInfo accountLoginInfo);

    /**
     * 选择企业
     * @param accountLoginInfo
     * @param code
     */
    void getCustomerCode(AccounLoginInfo accountLoginInfo, String code);
}
